import axios from '@/libs/api.request'
// import server from '@/libs/server'
const prefix = '/marketing/activity/card'
// 集卡活动列表
export const getCardLists = data => axios.request({
  url: `${prefix}/list`,
  method: 'post',
  data
})
// 集卡活动删除
export const deleteCard = data => axios.request({
  url: `${prefix}/delete`,
  method: 'post',
  data
})
// 集卡活动启用
export const startCard = data => axios.request({
  url: `${prefix}/enable`,
  method: 'post',
  data
})
// 集卡活动详情
export const cardDetail = data => axios.request({
  url: `${prefix}/get`,
  method: 'post',
  data
})
// 查看粉碎碎片
export const fragmentCard = data => axios.request({
  url: `${prefix}/fragment/list`,
  method: 'post',
  data
})
// 计算赠币券
export const couponCalculate = data => axios.request({
  url: `${prefix}/coupon/calculate`,
  method: 'post',
  data
})
// 单位币值查询
export const searchCoin = data => axios.request({
  url: '/sales/crs/finance/coin/daily/unit',
  method: 'post',
  data
})
// 活动成本计算
export const calculateMoney = data => axios.request({
  url: `${prefix}/calculate`,
  method: 'post',
  data
})
// 集卡活动新增
export const cardCreate = data => axios.request({
  url: `${prefix}/create`,
  method: 'post',
  data
})
// 集卡活动编辑
export const cardUpdate = data => axios.request({
  url: `${prefix}/update`,
  method: 'post',
  data
})
// 集卡活动商品列表
export const cardGoods = data => axios.request({
  url: `${prefix}/product/list`,
  method: 'post',
  data
})
// 集卡活动商品列表分类
export const cardGoodsType = data => axios.request({
  url: `${prefix}/category/list`,
  method: 'post',
  data
})
